package com.dotflat.check.repository;

import com.dotflat.check.domain.CheckCard;
import com.matt.domain.record.CheckInRule;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Repository
public interface CheckInRulerRepository extends JpaRepository<CheckInRule, String>, JpaSpecificationExecutor<CheckInRule> {


    CheckInRule findByEnableStatus(Integer enableStatus);

    @Query(value=" select * from check_in_rule where enableStatus = ?1 and areaId = ?2 and del_flag = ?3 ",nativeQuery = true)
    CheckInRule findByEnableStatusAndAreaIdAndDel_flag(int i, String areaId,String delFlag);
}
